<template>
  <!-- 周一周四·新品首发 -->
  <div class="NewGoodsList">
    <div class="newGoodsListwenzi">周一周四·新品首发</div>
    <ul>
      <li v-for="item in newGoodsList" :key="item.id" @click="GoProductFn(item.id)">
        <img v-lazy="item.list_pic_url" alt="" />
        <p class="p1">{{ item.name }}</p>
        <p class="p2">{{ item.retail_price | filterPrice }}</p>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  props: ["newGoodsList"],
  data() {
    return {};
  },
  methods:{
     //跳转到详情页 携带id
    GoProductFn(id){
      this.$router.push(`/product/${id}`)

    }
  }
};
</script>
 
<style lang = "less" scoped>
.NewGoodsList {
  padding: 0.1rem;
  background-color: #fff;
  text-align: center;
  margin-bottom: .1rem;
   font-family: "黑体";
}
.newGoodsListwenzi {
  height: 0.5rem;
  line-height: 0.5rem;
  font-size: 0.18rem;
  font-family: "黑体";
}
ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
 
  li {
    width: 49%;
     padding-bottom: .1rem;
  margin-bottom: .1rem;
    img {
      width: 100%;
    }
    .p2 {
      color: #8b0000;
      margin-top: .05rem;
    }
  }
}
</style>